<template>
	<view class="resume">
		<view class="resumeList" v-for="item in resumeList" :key="item.id" @click="toDetailPage(item.name)">
			<text class="title">{{item.name}}</text>
			<text v-if="item.default" class="default">默认投递</text>
			<view>
				<text class="updateAt">更新时间：{{item.updateAt}}</text>
			</view>
			<text class="edit">编辑</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				resumeList: [{
						id: 1,
						name: '简历1',
						updateAt: '2022/01/04',
						default: 1
					},
					{
						id: 2,
						name: '简历2',
						updateAt: '2022/01/05',
						default: 0
					},
					{
						id: 3,
						name: '简历3',
						updateAt: '2022/01/06',
						default: 0
					}
				]
			}
		},
		methods: {
			toDetailPage(name){
				uni.navigateTo({
					url:'resumeDetail?barTitle='+name
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.resume {
		margin: 0 32rpx;

		.resumeList {
			padding: 24rpx 0 22rpx;
			border-bottom: 2rpx solid #EEEEEE;
			position: relative;

			.edit {
				background: rgba(28, 116, 255, 0.11);
				border-radius: 28rpx;
				padding: 6rpx 32rpx 10rpx;
				position: absolute;
				right: 0;
				top: 44rpx;
				color: #2674FF;
				font-size: 28rpx;
			}

			.title {
				font-size: 32rpx;
				font-weight: 500;
				color: #111111;
				margin-right: 16rpx;
			}

			.default {
				padding: 2rpx 8rpx;
				border: 2rpx solid #2674FF;
				color: #2674FF;
				font-weight: 400;
				font-size: 20rpx;
			}

			.updateAt {
				font-size: 24rpx;
				font-weight: 400;
				color: #666666;
				margin-top: 16rpx;
			}
		}

	}
</style>
